package com.mrtan.mapper;

import com.mrtan.bean.Details;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Mr.Tan
 * @description 针对表【details】的数据库操作Mapper
 * @createDate 2023-12-04 11:12:04
 * @Entity com.mrtan.bean.Details
 */
public interface DetailsMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(Details record);

    int insertSelective(Details record);

    Details selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Details record);

    int updateByPrimaryKey(Details record);

    List<Details> selectAll();

    int insertBySell(@Param("orderId") Integer orderId, @Param("productId") Integer productId, @Param("quantity") Integer number);
    void insertByPurchase(@Param("product") Integer product,@Param("quantity") Integer quantity, @Param("orderId") Integer orderId);

}
